package com.biz.user.event;

import lombok.extern.slf4j.*;
import org.springframework.context.*;
import org.springframework.stereotype.*;

import javax.annotation.*;

/**
 * @Description
 *      事件发布的类
 * @Author liuxi
 * @Date 2024/5/10
 **/
@Service
@Slf4j
public class PersonEventService {

    @Resource
    private ApplicationEventPublisher applicationEventPublisher;

    public void createPersson(Person person) {
        applicationEventPublisher.publishEvent(new PersonChangeEvent(person, "create"));
    }
}
